FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class > SortColumns Method : SortColumns(Int32,Int32,SortInfo[]) Method |
'Declaration Public Overloads Function SortColumns( _ ByVal column As Integer, _ ByVal columnCount As Integer, _ ByVal sortInfo() As SortInfo _ ) As Boolean
Use this method if you want to sort only a range of columns and not the entire sheet.
Use this method if you want to specify more than one row by which to sort. In other words, if you have more than one key for sorting. The SortInfo array can contain multiple keys (multiple rows) and the first specified row is the primary key, etc. The SortInfo array can also contain a value for IComparer to allow you to specify the way of comparing that is used in the sort and it may be different for each key.
FarPoint.Web.Spread.SheetView sv; FarPoint.Web.Spread.SortInfo[] s = new FarPoint.Web.Spread.SortInfo[1]; s[0] = new FarPoint.Web.Spread.SortInfo(0, false); sv = FpSpread1.ActiveSheetView; sv.SortColumns(0, 2, s);
Dim sv As FarPoint.Web.Spread.SheetView Dim s(1) As FarPoint.Web.Spread.SortInfo s(0) = New FarPoint.Web.Spread.SortInfo(0, False) sv = FpSpread1.ActiveSheetView sv.SortColumns(0, 2, s)
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6